package com.game.dubbo;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/6/8.
 */
public class DubboLauncher {
	private static Logger logger = LoggerFactory.getLogger(DubboLauncher.class);
	public static void main(String[] args) {
		new ClassPathXmlApplicationContext(new String[]{"spring.xml"});
		logger.info("dubbo server start success....");
		Runtime.getRuntime().addShutdownHook(new Thread() {
			@Override
			public void run() {
				synchronized (DubboLauncher.class) {
					DubboLauncher.class.notify();
				}
			}
		});
		try {
			synchronized (DubboLauncher.class) {
				DubboLauncher.class.wait();
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}
}
